package com.yml.mall.category.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import java.util.List;

/**
 * @ClassName CategoryStructureDTO
 * @Author Administrator
 * @Date 2020/4/8   16:41
 */
@Data
@EqualsAndHashCode
@ApiModel(value = "类目对象",description = "")
public class CategoryStructureDTO {
    @ApiModelProperty(value = "ID")
    private Integer id;

    @NotBlank(message = "父类ID不能为空")
    @ApiModelProperty(value = "父类ID")
    private Integer parentId;

    @NotBlank(message = "类目名字不能为空")
    @ApiModelProperty(value = "类目名字")
    private String name;

    @ApiModelProperty(value = "排序")
    private Integer sortOrder;

    @ApiModelProperty(value = "子目录结构")
    List<CategoryStructureDTO> subCategoryStructureDTOs;
}
